// dataprocessor.h
#ifndef DATAPROCESSOR_H
#define DATAPROCESSOR_H

#include <QObject>
#include <QQmlEngine>

class DataProcessor : public QObject
{
    Q_OBJECT
    QML_ELEMENT  // Qt 6中使用，Qt 5中需要手动注册

public:
    explicit DataProcessor(QObject *parent = nullptr);

    Q_INVOKABLE QString processData(const QString &input);
    Q_INVOKABLE QVariantList processArray(const QVariantList &data);

signals:
    void dataProcessed(const QString &result);

private:
         // 你的数据处理逻辑
};

#endif // DATAPROCESSOR_H
